home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / program / snip9611.zip / ANSISELF.C < prev    next >
C/C++ Source or Header  |  1996-11-24  |  457b  |  13 lines

  1. /* +++Date last modified: 02-Nov-1995 */
  2.  
  3. /*
  4. **  Challenge: Write the smallest self-duplicating program, not
  5. **  reading the source file, which successfully exits and is strictly
  6. **  conforming Standard C.
  7. **
  8. **  Public domain response by Thad Smith
  9. */
  10.  
  11. #include<stdio.h>
  12. main(){char*c="\\\"#include<stdio.h>%cmain(){char*c=%c%c%c%.102s%cn%c;printf(c+2,c[102],c[1],*c,*c,c,*c,c[1]);exit(0);}\n";printf(c+2,c[102],c[1],*c,*c,c,*c,c[1]);exit(0);}
  13.